<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../2018-11-30/lib/vue.js"></script>
</head>

<body>
    <div id="app">
       <p>{{ msg | msgFormat('疯狂') | test }}</p>
    </div>
    <script>
        Vue.filter('msgFormat',function(msg,arg){
            return msg.replace(/单纯/g,arg)
        })

        Vue.filter('test',function(msg){
            return msg + '======='
        })

        var app = new Vue({
            el: '#app',
            data: {
                msg:'曾经我也是一个单纯的少年，单纯的我，傻傻的问，谁是世界上最单纯的男人'
                
            },
            methods:{  //定义当前实例所有可用的方法
                
            }
        })
    </script>
</body>

</html>